package com.ft.oa.domain.sys;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 操作日志表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Accessors(chain = true)
public class SysOperateLog {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 操作内容
     */
    private String info;
    /**
     * 操作模块
     */
    private String module;
    /**
     * 操作类型
     */
    private String type;
    /**
     * 操作人id
     */
    private Long creator;

    /**
     * 操作人name
     */
    private String creatorName;

    /**
     * 创建时间
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 页数
     */
    @TableField(exist = false)
    private int page;
    /**
     * 每页条数
     */
    @TableField(exist = false)
    private int size;
    /**
     * 时间左界
     */
    @TableField(exist = false)
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
    private LocalDate beforeTime;
    /**
     * 时间右界
     */
    @TableField(exist = false)
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
    private LocalDate afterTime;

}
